package mapper;

import entity.Role;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface RoleMapper {


    int update(Role role);

    int insert(Role role);

    @Delete("delete from Role where id=#{id}")
    int delete(Integer id);

    @Select("select * from Role where id=#{id}")
    Role selectById(Integer id);

    List<Role> selectByMap(Map<String, Object> params);

    List<Role> selectByRoleId(Integer id);

    List<Role> selectAll();
}
